/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pojo;

import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author pvhuy
 */
@Entity
@Table(name=ChauLuc.TABLE_CHAULUC)
public class ChauLuc extends Base {
    public static final String TABLE_CHAULUC = "ChauLuc";

    protected static final String COLUMN_TENCHAULUC = "TenChauLuc";
    private static final int LENGTH_TENCHAULUC = 45;
    @Column(name=COLUMN_TENCHAULUC, length=LENGTH_TENCHAULUC, nullable=false)
    private String tenChauLuc;

    @OneToMany(mappedBy="chauLuc", cascade=CascadeType.ALL)
    private List<DiaChi> danhSachDiaChi;

    /**
     * @return the tenChauLuc
     */
    public String getTenChauLuc() {
        return tenChauLuc;
    }

    /**
     * @param tenChauLuc the tenChauLuc to set
     */
    public void setTenChauLuc(String tenChauLuc) {
        this.tenChauLuc = tenChauLuc;
    }

    /**
     * @return the danhSachDiaChi
     */
    public List<DiaChi> getDanhSachDiaChi() {
        return danhSachDiaChi;
    }

    /**
     * @param danhSachDiaChi the danhSachDiaChi to set
     */
    public void setDanhSachDiaChi(List<DiaChi> danhSachDiaChi) {
        this.danhSachDiaChi = danhSachDiaChi;
    }

}
